package ru.urfc.portal.ui.client.renderers;

import ru.urfc.portal.ui.client.Style;
import ru.urfc.portal.ui.client.descriptor.GridField;
import ru.urfc.portal.ui.client.renderers.colorers.RedGreenColorer;

import com.extjs.gxt.ui.client.data.ModelData;
import com.google.gwt.dom.client.Element;

public class DoubleRenderer extends IntegerRenderer {

	public DoubleRenderer(GridField field, Element element) {
		super(field, element);
		setDoubleFormat();
	}

	@Override
	public String render(ModelData modelData) {
		Double value = field.getValue(modelData);
		return render(value);
	}

	public void setRedGreenColorer(Style style) {
		this.colorer = new RedGreenColorer(field, element, style);
	}
	
}
